Skip to content

Added DB Name Alias Pointing To The SubSchema#217

Open
srnand wants to merge 1 commit intomainfrom
sthakkar/apr29_26/addingNameAliasForSubSchemaReference
Open

Added DB Name Alias Pointing To The SubSchema#217
srnand wants to merge 1 commit intomainfrom
sthakkar/apr29_26/addingNameAliasForSubSchemaReference

Conversation

@srnand
Copy link
Copy Markdown
Collaborator

@srnand srnand commented Apr 29, 2026

Summary

  • K8sDatabaseTable.addDatabases now also registers an alias under metadata.name pointing into the catalog's spec.schema sub-schema. A Database CRD with name: iceberg-metrics, catalog: ICEBERG, schema: metrics_hourly is queryable as both "ICEBERG"."metrics_hourly"."t" and "iceberg-metrics"."t".

Testing

  • Added UTs.

@github-actions
Copy link
Copy Markdown

Code Coverage

Overall Project 84.63% 🟢
Files changed 100% 🟢

File Coverage
K8sDatabaseTable.java 100% 🟢


// Also expose the metadata.name as an alias pointing into the schema
if (row.SCHEMA != null && !row.SCHEMA.isEmpty() && !row.NAME.equalsIgnoreCase(row.CATALOG)) {
parentSchema.add(row.NAME, catalogSchema.createSchema(row.SCHEMA));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Are we sure createSchema isn't expensive? Does it just return an existing schema or smth?
  2. Wondering if this unnecessarily pollutes !schemas etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants